var counter = {
    props:['init'],
    template:'<button @click="numberClick">{{number}}</button>',
    data:function () {
        return {
            number:0
        }
    },methods:{
        numberClick:function () {
            this.number++;
            this.$emit('current',this.number);
        }
    },mounted:function () {
        this.number = this.init;
    }
}

export default {
    counter
}